package router

import (
	"github.com/gin-gonic/gin"
	"lab.com/controller"
)

// initForumRouter 论坛接口
func initForumRouter(e *gin.Engine) {

	forumControl := controller.Forum
	forumRouter := e.Group("/forum")
	//帖子新增
	forumRouter.POST("post/add", forumControl.PostAdd)
	//帖子编辑
	forumRouter.POST("post/edit", forumControl.PostEdit)
	//帖子列表
	forumRouter.GET("post/list", forumControl.PostList)
	//帖子详情
	forumRouter.GET("post/detail", forumControl.PostDetail)

	//评论新增
	forumRouter.POST("comment/add", forumControl.CommentAdd)
	//评论列表
	forumRouter.GET("comment/list", forumControl.CommentList)
	//评论列表（内部）
	forumRouter.GET("comment/inner-list", forumControl.CommentInnerList)
	//评论列表（无折叠）
	forumRouter.GET("comment/unfolded-list", forumControl.CommentUnfoldedList)

}
